import request from '@/utils/request';

export async function queryFavoritePage(page_size, page_num) {
  return request(`/api/gold/user_collection_list?page_size=${page_size}&page_num=${page_num}`, {
    page_size,
    page_num,
  });
}

export async function queryPageDetail(id, type) {
  // console.log('id:', id, ' type:', type);
  // return request(`/api/gold/get_all_detail`, {
  //   method: 'POST',
  //   body: {
  //     id: id,
  //     api_type: type
  //   }
  // });
  return request(`/api/gold/public_detail_info?id=${id}&api_type=${type}`, {
    id: id,
    api_type: type,
  });
}

export async function removeFav(payload) {
  return request(`/api/gold/user_collection`, {
    method: 'POST',
    body: {
      ...payload,
    },
  });
}
